package com.tjetc.hw.hw6;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class hw {
    public static void main(String[] args) throws IOException {
        FileInputStream fileInputStream = new FileInputStream("1.jpg");
        FileOutputStream fileOutputStream = new FileOutputStream("2.jpg");
        int num;

        while ((num=fileInputStream.read())!=-1){
            fileOutputStream.write(num);
        }
        fileOutputStream.close();
        fileInputStream.close();
    }

}
